using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.Application;
using MatrixFramework.Shared.Contracts;
using Microsoft.Extensions.Configuration;

namespace MatrixFramework.Shared.Application
{
    /// <summary>
    /// MatrixFramework共享应用模块
    /// 提供基础的共享功能
    /// </summary>
    [DependsOn(
        typeof(AbpDddApplicationModule),
        typeof(AbpAutoMapperModule),
        typeof(MatrixFrameworkSharedContractsModule)
    )]
    public class MatrixFrameworkSharedApplicationModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            // 配置AutoMapper
            Configure<AbpAutoMapperOptions>(options =>
            {
                options.AddMaps<MatrixFrameworkSharedApplicationModule>();
            });
        }
    }
}